package com.rowger.player.ui.activity

import android.os.Build
import android.preference.PreferenceManager
import android.support.annotation.RequiresApi
import android.support.v7.widget.Toolbar
import android.widget.Toast
import com.rowger.player.R
import com.rowger.player.R.id.toolbar
import com.rowger.player.base.BaseActivity
import com.rowger.player.util.ToolBarManager
import org.jetbrains.anko.find
import org.jetbrains.anko.toast

/**
 * Created by Administrator on 2018/5/9.
 */
class SettingActivity:BaseActivity(),ToolBarManager {
    //惰性加载
    override val toolbar by lazy { find<Toolbar>(R.id.toolbar) }

    override fun getLayoutId(): Int {
     return R.layout.activity_setting
    }

    @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
    override fun initData() {
        initSettingToolbar()
        val sp=PreferenceManager.getDefaultSharedPreferences(this)
        val push =sp.getBoolean("push",false)
        toast("push=$push")
        // println("push=$push")
        //Toast.makeText(this,push,Toast.LENGTH_LONG).show()
    }
}